package cheme.ProcessEditor.Tools;

import java.util.ArrayList;
import java.util.List;

import org.eclipse.gef.Request;

import cheme.ProcessEditor.ChemeConstants;


public class CreateAfterRequest extends Request
{
	List afterList = new ArrayList();
	
	public CreateAfterRequest()
	{
		super(ChemeConstants.CREATE_AFTER);
	}

	/**
	 * @param after
	 */
	public CreateAfterRequest(Object after)
	{
		this();
		addToAfterList(after);
	}
	
	public void addToAfterList(Object object)
	{
		if(afterList.contains(object))
		{
			throw new Error("CreateAfterRequest.addToAfterList can only add unique objects.");
		}
		
		afterList.add(object);
	}
	
	public List getAfterList()
	{
		return afterList;
	}
}